package com.zy.orders.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zy.model.Orders;
import com.zy.web.bean.OrdersDTO;
import com.zy.web.bean.OrdersItemsDTO;

import java.util.List;

/**
 * @program: shopping147_cloud
 * @description:
 * @author: zy
 * @create: 2025-08-02 14:02
 */
public interface OrdersService extends IService<Orders> {
    /**
     * 创建一个新订单
     *
     * @param ordersDTO         订单数据
     * @param orderItemsDTOList 订单项数据列表
     * @param cartIds
     * @return 成功创建的订单ID
     */
    OrdersDTO createOrder(Long userId, OrdersDTO ordersDTO, List<OrdersItemsDTO> orderItemsDTOList, List<Long> cartIds);
}
